package com.greateamd.timetableasy.client.widgets.event;

import com.greateamd.timetableasy.client.domain.EventModality;
import com.greateamd.timetableasy.client.widgets.LabelizableListBox;

public final class EventModalityListBox extends LabelizableListBox {

	public EventModalityListBox() {
		super(false);
		for(EventModality value : EventModality.values()){
			if(!value.equals(EventModality.CUSTOM))
				addValue(value.getText());
		}
	}

	public void setValue(EventModality modality) {
		super.setValue(modality.getText());
	}
	
	public EventModality getEventModalitySelected(){
		return EventModality.getEventModalityOf(getValue());
	}
}
